import request from "@/util/request";

export function getTeacherPage(currentPage, pageSize) {
  return request({
    url: `/teacher-api/edu/teacher/page/${currentPage}/${pageSize}`,
    method: "get",
  });
}

export function delTeacher(tNo) {
  return request({
    url: `/teacher-api/edu/teacher/delete/${tNo}`,
    method: "delete",
  });
}

export function searchTeacher(tNo) {
  return request({
    url: `/teacher-api/edu/teacher/info/${tNo}`,
    method: "get",
  });
}

export function editTeacher(teacherForm) {
  return request({
    url: `/teacher-api/edu/teacher/update`,
    method: "put",
    data: teacherForm,
  });
}

export function addTeacher(teacherForm) {
  return request({
    url: `/teacher-api/edu/teacher/save`,
    method: "post",
    data: teacherForm,
  });
}

export function getTeacherList() {
  return request({
    url: `/teacher-api/edu/teacher/list`,
    method: "get",
  });
}
